package cn.exrick.xboot.shop.entity;

import java.io.Serializable;
import java.util.Date;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * <p>
 * 文章表
 * </p>
 *
 * @author yuhaifei
 * @since 2022-01-21
 */
@Data
@TableName("shop_article")
@ApiModel(value = "文章表")
public class ShopArticle implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     *
     */
    @TableId(value = "id", type = IdType.AUTO)
    @TableField(value = "id")
    @ApiModelProperty(value = "")
    private Integer id;

    /**
     * 标题
     */
    @TableField(value = "title")
    @ApiModelProperty(value = "标题")
    private String title;

    /**
     * 图片
     */
    @TableField(value = "img_url")
    @ApiModelProperty(value = "图片")
    private String imgUrl;

    /**
     * 标签
     */
    @TableField(value = "tags")
    @ApiModelProperty(value = "标签")
    private String tags;

    /**
     * 内容
     */
    @TableField(value = "content")
    @ApiModelProperty(value = "内容")
    private String content;

    /**
     * 小程序用户id
     */
    @TableField(value = "member_id")
    @ApiModelProperty(value = "小程序用户id")
    private String memberId;

    /**
     * 小程序用户openid
     */
    @TableField(value = "open_id")
    @ApiModelProperty(value = "小程序用户openid")
    private String openId;

    /**
     * 头像
     */
    @TableField(value = "avatar")
    @ApiModelProperty(value = "头像")
    private String avatar;

    /**
     * 昵称
     */
    @TableField(value = "nickname")
    @ApiModelProperty(value = "昵称")
    private String nickname;

    /**
     * 手机
     */
    @TableField(value = "mobile")
    @ApiModelProperty(value = "手机")
    private String mobile;

    /**
     * 创建时间
     */
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(value = "create_time")
    @ApiModelProperty(value = "创建时间")
    private Date createTime;

    /**
     * 编辑时间
     */
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(value = "modify_time")
    @ApiModelProperty(value = "编辑时间")
    private Date modifyTime;

    /**
     * 删除标记
     */
    @TableLogic
    @TableField(value = "del_flag")
    @ApiModelProperty(value = "删除标记")
    private Integer delFlag;


    /**
     * 搜索值
     */
    @TableField(exist = false)
    private String value;

}
